package com.bdqn.BookManage.view;

import com.bdqn.BookManage.po.BookInfo;

/**
 * @author : CP
 * @version: 1.0
 * @program : BookManage
 * @description : 图书信息购物车显示视图
 * @date : 2020-07-28 12:09
 **/
public class BookInfoView {
    /** 是否选中 */
    private Integer isSelected;
    /** 图书信息 */
    private BookInfo bookInfo;
    /** 数量 */
    private Integer amount;
    /** 总价 */
    private Double total;

    public Integer getIsSelected() {
        return isSelected;
    }

    public void setIsSelected(Integer isSelected) {
        this.isSelected = isSelected;
    }

    public BookInfo getBookInfo() {
        return bookInfo;
    }

    public void setBookInfo(BookInfo bookInfo) {
        this.bookInfo = bookInfo;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Double getTotal(){
        return this.amount*this.bookInfo.getPrice();
    }

    public BookInfoView() {
    }

    public BookInfoView(Integer isSelected, BookInfo bookInfo, Integer amount) {
        this.isSelected = isSelected;
        this.bookInfo = bookInfo;
        this.amount = amount;
    }
}
